package cn.duyo.spring.core.convert.support;

import cn.duyo.spring.core.convert.converter.ConverterRegistry;

/**
 * 默认的类型转换服务
 * tips: 默认继承了通用类型转换服务
 *
 * @author du
 */
public class DefaultConversionService extends GenericConversionService{

    public DefaultConversionService() {
        addDefaultConverters(this);
    }

    public static void addDefaultConverters(ConverterRegistry converterRegistry) {
        // TODO 添加各类类型转换工厂，此处省略了很多内部默认实现
        converterRegistry.addConverterFactory(new StringToNumberConverterFactory());
    }

}